Fix hypervisor crash with unpopulated NUMA nodes
authorKeir Fraser <keir.fraser@citrix.com>
Wed, 7 Oct 2009 14:58:26 +0000 (15:58 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Wed, 7 Oct 2009 14:58:26 +0000 (15:58 +0100)
commitd6898a50a59884fa24b6f5f7303440d1a069a944
treee706186e1fe288fb256b4001356c308c8910484d
parentefa1e6c6b05705b4fede2bda994332639ecd70d9
Fix hypervisor crash with unpopulated NUMA nodes

On NUMA systems with memory-less nodes Xen crashes quite early in the
hypervisor (while initializing the heaps). This is not an issue if
this happens to be the last node, but "inner" nodes trigger this
reliably.  On multi-node processors it is much more likely to leave a
node unequipped.  The attached patch fixes this by enumerating the
node via the node_online_map instead of counting from 0 to num_nodes.

The resulting NUMA setup is still somewhat strange, but at least it
does not crash. In lowlevel/xc/xc.c there is again this enumeration
bug, but I suppose we cannot access the HV's node_online_map from this
context, so the xm info output is not correct (but xm debug-keys H
is).  I plan to rework the handling of memory-less nodes later.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
xen/common/page_alloc.c